    
<? 
require_once 'includes/funciones.php';
include ("seguridad.php");
conexion();
?>
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title><?php titulo();?></title>
<link rel="stylesheet" href="2col_rightNav.css" type="text/css" />
<script type="text/javascript"  src="plugins/jquery.js"></script>
<link rel="stylesheet"  href="plugins/jq_ui/css/custom-theme/jquery-ui-1.8.14.custom.css">
<script type="text/javascript" src="plugins/jquery_validate/jquery.validate.js"></script>
<script type="text/javascript"  src="plugins/thickbox/thickbox.js"></script>
<link rel="stylesheet" href="plugins/thickbox/thickbox.css" type="text/css" media="screen" />

<script language="JavaScript"  type="text/JavaScript">
    $(document).ready(function(){
        $("#prov").change(function(event){
            
            var id = $("#prov").find(':selected').val();
                     //$("#dpto").load('selectdpto.php?var='+id);
                     //$("#dptoayuda").load('selectdptoayuda.php?var='+id);
                     $("#resultado").load('bprov.php');
                     //$("#muni").load('selectmuni.php');
        });

    });

</script>

<script language="JavaScript"  type="text/JavaScript">
    $(document).ready(function(){
        $("#reg").change(function(event){
            var id = $("#reg").find(':selected').val();
                 
                 $("#dpto").load('selectdpto.php?var='+id);
                 $("#prov").load('selectiprov.php');
                 $("#dptoayuda").load('selectdptoayuda.php?var='+id);
                 $("#resultado").load('breg.php?var='+id);
		 $("#muni").load('selectmuni.php');
        });

    });

</script>

<script language="JavaScript"  type="text/JavaScript">
    $(document).ready(function(){
        $("#dpto").change(function(event){
            var a = '';
            var idm = $("#dpto").find(':selected').val();
            $("#prov").load('selectiprov.php');
            $("#muni").load('selectmuni.php?var='+idm);
            $("#dptoayuda").load('selectidptoayuda.php?var='+idm);
            $("#reg").load('selectireg.php?var='+idm);
            $("#resultado").load('bdpto.php?var='+idm);
        });

    });

</script>
<script language="JavaScript"  type="text/JavaScript">
    $(document).ready(function(){
        $("#muni").change(function(event){
            
            var idm = $("#muni").find(':selected').val();  
            $("#resultado").load('bmuni.php?var='+idm);
        });

    });

</script>
<style type="text/css">
<!--

</style>

</head>
<!-- The structure of this file is exactly the same as 2col_leftNav.html;
     the only difference between the two is the stylesheet they use -->

<body>
<div   class="supercontendeor">
<div id="encabezado">
   	<?php
	require_once("encabezado.php");

	?> 
</div>
<!-- fin encabesado -->
<div id="content">
  <div id="breadCrumb"></div>
  <h2 id="pageName">Buscar Capa Por Ubicación </h2>
  <div class="feature">
    <form id="form1" name="form1" method="post" action="">

  <label> </label><label></label>
  <br>
  <label></label>
  
    <p>&nbsp;</p>
    <table width="710" border="0">
      <tr>
        <td width="138"><label>
          <div align="right">Pais</div>
        </label>          </td>
        <td width="210"><select name="pais" id="pais">
          <?php
                $concla= mysql_query("select p.id,p.nombre from samptyt.pais as p;");
                while($rowconcla=mysql_fetch_array($concla))
                    {
                        echo '<option value="'.$rowconcla['id'].'">'.$rowconcla['nombre'].' </option>';
                    }
                    ?>
        </select></td>
        <td width="348" rowspan="6"><div id="dptoayuda"></div></td>
      </tr>
      <tr>
        <td><label>
          <div align="right">Provincia </div>
        </label></td>
        <td>
          <select name="prov" id="prov">
              <option value ="">Selecione Provincia</option>
          <?php
                $concla= mysql_query("select p.id,p.nombre from samptyt.provincia as p WHERE p.id>0;");
                while($rowconcla=mysql_fetch_array($concla))
                    {
                        echo '<option value="'.$rowconcla['id'].'">'.$rowconcla['nombre'].' </option>';
                    }
                    ?>
        </select></td>
        </tr>
      <tr>
        <td><label>
          <div align="right">Region</div>
        </label></td>
        <td><select name="reg" id="reg">
          <option value ="">Selecione Region</option>
          <?php
                $concla= mysql_query("select r.id, r.nombre from samptyt.region as r WHERE r.id>0;");
                while($rowconcla=mysql_fetch_array($concla))
                    {
                        echo '<option value="'.$rowconcla['id'].'">'.$rowconcla['nombre'].' </option>';
                    }
                    ?>
        </select></td>
        </tr>
      <tr>
        <td><label>
          <div align="right">Departamento </div>
        </label></td>
        <td><select name="dpto" id="dpto">
          <option value ="">Selecione Departamento</option>
          <?php
                $concla= mysql_query("select d.id,d.nombre from samptyt.departamento as d WHERE d.id>0");
                while($rowconcla=mysql_fetch_array($concla))
                    {
                        echo '<option value="'.$rowconcla['id'].'">'.$rowconcla['nombre'].' </option>';
                    }
                    ?>
        </select></td>
        </tr>
      <tr>
        <td><label></label>
          <label> 
          <div align="right">Municipio </div>
          </label></td>
        <td><select name="muni" id="muni">
          <option value ="">Selecione Municipio</option>
        </select></td>
        </tr>
      <tr>
        <td align="right"><br><label></label></td>
        <td><br>
          <input type="submit" name="Submit" value="Reiniciar Formulario">        </td>
        </tr>
    </table>
    <p>&nbsp;</p>
    </form>
    <div id= "resultados">    </div>
    
    <p>
    <hr>

<div id="resultado"  >
</div>
     
  </div>
  <div class="story">
    <h3>&nbsp;</h3>
  </div>
  <div class="story"></div>
</div>
<!--end content -->
<div id="menuderecha">
     	<?php
	require_once("menuderecha.php");

	?> 
</div>
<!--fin menuderecha -->
<div id="footer">
     	<?php
	require_once("footer.php");

	?> 
</div>

<br />
</div>
</body>
</html>